package com.ruicar.afs.cloud.bizcommon.dto.rules.atom;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.bizcommon.enums.rules.RuleStatus;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class AfsRuleInfoDto {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 规则编号
     */
    @NotBlank(message = "规则编号不能为空")
    @NotNull(message = "规则编号不能为空")
    private String ruleNo;
    /**
     * 规则名称
     */
    @NotBlank(message = "规则名称不能为空")
    @NotNull(message = "规则名称不能为空")
    private String ruleName;
    /**
     * 所属规则组
     */
    @NotBlank(message = "所属规则组不能为空")
    @NotNull(message = "所属规则组不能为空")
    private String ruleGroup;
    /**
     * 优先级
     */
    private Integer sortOrder;
    /**
     * 有效期起
     */
    private String activeStartDate;
    /**
     * 有效期止
     */
    private String activeEndDate;
    /**
     * 状态;new-创建
     * active-生效
     * expired-失效
     */
    private RuleStatus status;

    private String ruleOut;

    private int ruleVersion;

    private String ruleData;

    private boolean validate;

}
